
<%@ page import="eudjok.SetList" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="layout" content="main" />
        <g:set var="entityName" value="${message(code: 'setList.label', default: 'SetList')}" />
        <title><g:message code="default.list.label" args="[entityName]" /></title>
<script>
function AbreAba(nome_div)
{
var total_divs = document.getElementsByTagName('div').length;
var div = "";
var td = "";

for (var i=1; i < total_divs+1; i++)
{
div = "div"+i;
td = "td"+i;
document.getElementById(div).style.display = "none"; 
document.getElementById(td).style.backgroundColor = "";
document.getElementById(div).className="div"; 

if (div == nome_div)
{
document.getElementById(nome_div).style.display = "block"; 
document.getElementById(td).style.backgroundColor = "#CCCCCC";
}
}
}
</script>
	
	</head>
    <body>
        <div id="navegacao">
           	 	<div class="homePagePanel">
           	     	<div class="panelTop"></div>
           	     	<div class="panelBody" id="panelBody">
           	        	 <g:render template="/common/perfil/Dj" />
           	     	</div>
           	    	 <div class="panelBtm"></div>
           		 </div>
        	</div>
			
				
		<div id="centroLivre">
			<h2 class="pretoPrincipal">Top Setlists</h2>
			
			<p class="nav">
				Confira aqui as melhores setlists do euDj
			</p>
	<table width="300" cellspacing="0">
	<tr>
	<br>
		<td id="td1"><a href="#" onclick="AbreAba('div1')">Mais Visitados</a></td>
		<td id="td2"><a href="#" onclick="AbreAba('div2')">Mais Indicados</a></td>
		<td id="td3"><a href="#" onclick="AbreAba('div3')">Top 10</a></td>
	</tr>
</table>

			<div id="div1" style="display:block">    
       
             <h1><g:message code="Mais Visitadas" args="[entityName]" /></h1> 
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <div class="topsetlist">
                <table>
                    <thead>
                        <tr>
                        
                         
                                                
                            <th><g:message code="setList.titulo.label" default="Titulo" /></th>
                                <th><g:message code="setList.visitas.label" default="Visitas" /></th>  
                        
                        </tr>
                    </thead>
                    <tbody>
                    <g:each in="${setListInstanceVisity}" status="i" var="setListInstance">
                        <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
                        
                                                 
                     
                            <td>${i+1}. ${fieldValue(bean: setListInstance, field: "titulo")}</td>
							  <td>${fieldValue(bean: setListInstance, field: "visitas")}</td>
                         
                        </tr>
                    </g:each>
                    </tbody>
                </table>
        

        </div>
		</div>
		<div id="div2" style="display:none">

            <h1><g:message code="Mais Indicados" args="[entityName]" /></h1> 
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <div class="topsetlist">
                <table>
                    <thead>
                        <tr>
                        
                        
                                                
                            <th><g:message code="setList.titulo.label" default="Titulo" /></th>
                             <th><g:message code="setList.indicacoes.label" default="Indicações" /></th>       
                        
                        </tr>
                    </thead>
                    <tbody>
                    <g:each in="${setListInstanceIndicado}" status="i" var="setListInstance">
                        <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
                        
                                                 
                               
                            <td>${i+1}. ${fieldValue(bean: setListInstance, field: "titulo")}</td>
                            <td>${fieldValue(bean: setListInstance, field: "indicacoes")}</td>
                        </tr>
                    </g:each>
                    </tbody>
                </table>
            

        </div>
        </div>
				
	<div id="div3" style="display:none">
        
            <h1><g:message code="Top 10" args="[entityName]" /></h1> 
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
           <div class="topsetlist">
                <table >
                    <thead>
                        <tr>
                        
                        
                                                
                            <th><g:message code="setList.titulo.label" default="Titulo" /></th>
							<th><g:message code="setList.titulo.label" default="Legal" /></th>
                               
                        
                        </tr>
                    </thead>
                    <tbody>
                    <g:each in="${setListInstanceTopList}" status="i" var="setListInstance">
                        <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
                        
                                                 
                                   
                            <td>${i+1}. ${fieldValue(bean: setListInstance, field: "titulo")}</td>
							<td>${fieldValue(bean: setListInstance, field: "avaliacaoPositiva")}</td>
                         
                        </tr>
                    </g:each>
                    </tbody>
                </table>
            </div>
		</div>
	</div>
          
            </div> 
        </div>
    </body>
</html>
